<?php
/**
 * Date: 2024-09-20
 */

namespace module\document\model;

use mof\Model;

class Document extends Model
{
    protected $name = 'document';

    protected array $searchFields = [
        'id'       => 'integer',
        'type'     => 'string',
        'sub_type' => 'string',
        'status'   => ['integer', 'zero' => true],
        'title'    => ['string', 'op' => 'like'],
    ];

    protected $scene = [
        'page'      => [
            'visible' => ['title', 'content', 'update_at']
        ],
        'list' => [
            'visible' => ['id', 'title', 'update_at']
        ],
        'detail'    => [
            'visible' => ['id', 'title', 'content', 'update_at']
        ]
    ];
}